<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="templates/template.xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core">
    <ui:define name="title">
        <h:outputText value="#{msgs['advertise.title.payingguest']}"/>
    </ui:define>
    <ui:define name="content">
        <f:metadata>
            <f:event type="preRenderView" listener="#{loginController.authorize(4)}"/>
        </f:metadata>
        <script type="text/javascript">
            function pageLoad() {
                setAdvertiseListing('cPayingGuest');
            }
        </script>
        <div id="welcome_message" class="basic_style_1">
            <h2 id="welcome_message_title" class="font_cufon">#{msgs['advertise.title.payingguest']}</h2>
            <h:form id="frmAdvertPayingGuest">
                <p:focus context="frmAdvertPayingGuest"/>
                <table id="grdAdvertPayingGuest" class="tblNeedPadding tblMain">
                    <tr>
                        <th colspan="4" class="tHeader">#{msgs['advertise.requiredField']}</th>
                    </tr>
                    <tr>
                        <td class="label"><h:outputLabel for="title" value="#{msgs['advertise.title_']}"/></td>
                        <td colspan="3">
                            <p:inputText style="width:95%" value="#{payingGuestController.model.title}"
                                         id="title" required="true" label="#{msgs['advertise.title_']}"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="label"><h:outputLabel for="city" value="#{msgs['advertise.city']}"/></td>
                        <td colspan="3">
                            <p:inputText style="width:95%" value="#{payingGuestController.model.payingGuestAccommodation.city}"
                                         id="city" required="true" label="#{msgs['advertise.city']}"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="label"><h:outputLabel for="location" value="#{msgs['advertise.location']}"/></td>
                        <td colspan="3">
                            <p:inputText style="width:95%" value="#{payingGuestController.model.payingGuestAccommodation.location}"
                                         id="location" required="true" label="#{msgs['advertise.location']}"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="label"><h:outputLabel for="deposit" value="#{msgs['advertise.deposit']}"/></td>
                        <td>
                            <p:inputText style="width:90%" value="#{payingGuestController.model.payingGuestAccommodation.deposit}"
                                         id="deposit" required="true" label="#{msgs['advertise.deposit']}"/>
                        </td>
                        <td class="label"><h:outputLabel for="rent" value="#{msgs['advertise.rent']}"/></td>
                        <td>
                            <p:inputText style="width:90%" value="#{payingGuestController.model.payingGuestAccommodation.rent}"
                                         id="rent" required="true" label="#{msgs['advertise.rent']}"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="label"><h:outputLabel for="contactDetails" value="#{msgs['advertise.contactDetails']}"/></td>
                        <td>
                            <p:inputText style="width:90%" value="#{payingGuestController.model.payingGuestAccommodation.contactDetails}"
                                         id="contactDetails" required="true" label="#{msgs['advertise.contactDetails']}"/>
                        </td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <th colspan="4" class="tHeader">#{msgs['advertise.optionalField']}</th>
                    </tr>
                    <tr>
                        <td class="label"><h:outputLabel for="description" value="#{msgs['advertise.description']}"/></td>
                        <td colspan="3">
                            <p:inputTextarea style="width:95%" rows="2" effectDuration="250" value="#{payingGuestController.model.description}"
                                             id="description" label="#{msgs['advertise.description']}"/>
                        </td>
                    </tr>
                    <tr>
                        <th colspan="4" class="tHeader">&nbsp;</th>
                    </tr>
                    <tr>
                        <td colspan="4" style="text-align:center">
                            <p:commandButton value="#{msgs['advertise.submitText']}" image="ui-icon ui-icon-tag" action="#{payingGuestController.advertise}" type="submit" update="growl"/>
                            &nbsp;<p:commandButton value="#{msgs['advertise.cancelText']}" image="ui-icon ui-icon-closethick" type="reset"/>
                        </td>
                    </tr>
                </table>
            </h:form>
        </div>
    </ui:define>
</ui:composition>




